#include<stdio.h>
int main()
{
	char arr[100] = { 0 };
	int start = 0;
	int start_max = 0;
	int rear = 0;
	int rear_max = 0;
	int max = 0;
	gets(arr);
	while (arr[start] != '!')
	{
		char x = arr[start];
		int max2 = 0;
		for (rear = start; arr[rear] != '!'; rear++)
		{
			if (arr[rear] == x)
			{
				max2++;
			}
			else
				break;
		}
		if (max2 > max)
		{
			max = max2;
			start_max = start;
			rear_max = rear-1;
		}
		start = rear;
	}
	if (max == 1)
		printf("no");
	else
	{
		int i;
		for (i = start_max; i <= rear_max; i++)
		{
			printf("%c", arr[i]);
		}
	}
}